package com.iplant.wms.service.po.mss;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.BasePO;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.po.DBBasePO;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.base.utils.annotation.join.DBJoin;

import java.io.Serializable;


/**
 * 范围   那些客户 哪些物料用这个模板
 */
@DBBasePO(TableName ="mss_transferrange" ,CheckName = {"CustomerID,MaterialGroupID,MaterialID"},
        Schemas = DBSchemas.WMS,Name = false,Code = false,Active = false)
public class MSSTransferRange extends BasePO implements Serializable {
    private static final long serialVersionUID = 1L;

    @DBCondition
    @DBField(CheckValue = true)
    public int RuleID = 0;

    @DBCondition
    @DBJoin(name = "Code",tableName = "mss_transferrule", tableAsName = "r1",
            Schemas = DBSchemas.WMS,MainTableField ="RuleID")
    public String RuleCode = "";
    @DBJoin(name = "Name",tableName = "mss_transferrule", tableAsName = "r1",
            Schemas = DBSchemas.WMS,MainTableField ="RuleID")
    public String RuleName = "";

    /**
     * 客户
     */
    @DBCondition
    @DBField
    public int CustomerID = 0;

    @DBJoin(name = "Code",tableName = "crm_customer", tableAsName = "c1",
            Schemas = DBSchemas.Basic,MainTableField ="CustomerID")
    public String CustomerCode = "";

    @DBJoin(name = "Name",tableName = "crm_customer", tableAsName = "c1",
            Schemas = DBSchemas.Basic,MainTableField ="CustomerID")
    public String CustomerName = "";

    @DBCondition
    @DBField
    public int MaterialGroupID = 0;
    @DBJoin(name = "Code",tableName = "mss_materialgroup", tableAsName = "m1",
            Schemas = DBSchemas.Basic,MainTableField ="MaterialGroupID")
    public String MaterialGroupCode = "";
    @DBJoin(name = "Name",tableName = "mss_materialgroup", tableAsName = "m1",
            Schemas = DBSchemas.Basic,MainTableField ="MaterialGroupID")
    public String MaterialGroupName = "";

    /**
     * 物料
     */
    @DBCondition
    @DBField
    public int MaterialID = 0;
    @DBJoin(name = "Name",tableName = "mss_material", tableAsName = "m2",
            Schemas = DBSchemas.Basic,MainTableField ="MaterialID")
    public String MaterialCode = "";
    @DBJoin(name = "Name",tableName = "mss_material", tableAsName = "m2",
            Schemas = DBSchemas.Basic,MainTableField ="MaterialID")
    public String MaterialName = "";

    @JsonProperty("CustomerID")
    public int getCustomerID() {
        return CustomerID;
    }

    public void setCustomerID(int customerID) {
        CustomerID = customerID;
    }

    @JsonProperty("CustomerCode")
    public String getCustomerCode() {
        return CustomerCode;
    }

    public void setCustomerCode(String customerCode) {
        CustomerCode = customerCode;
    }

    @JsonProperty("CustomerName")
    public String getCustomerName() {
        return CustomerName;
    }

    public void setCustomerName(String customerName) {
        CustomerName = customerName;
    }

    @JsonProperty("MaterialID")
    public int getMaterialID() {
        return MaterialID;
    }

    public void setMaterialID(int materialID) {
        MaterialID = materialID;
    }

    @JsonProperty("MaterialCode")
    public String getMaterialCode() {
        return MaterialCode;
    }

    public void setMaterialCode(String materialCode) {
        MaterialCode = materialCode;
    }

    @JsonProperty("MaterialName")
    public String getMaterialName() {
        return MaterialName;
    }

    public void setMaterialName(String materialName) {
        MaterialName = materialName;
    }

    @JsonProperty("RuleID")
public int getRuleID() {
        return RuleID;
    }

    public void setRuleID(int ruleID) {
        RuleID = ruleID;
    }

    @JsonProperty("RuleCode")
    public String getRuleCode() {
        return RuleCode;
    }

    public void setRuleCode(String ruleCode) {
        RuleCode = ruleCode;
    }

    @JsonProperty("RuleName")
    public String getRuleName() {
        return RuleName;
    }

    public void setRuleName(String ruleName) {
        RuleName = ruleName;
    }

    @JsonProperty("MaterialGroupID")
    public int getMaterialGroupID() {
        return MaterialGroupID;
    }

    public void setMaterialGroupID(int materialGroupID) {
        MaterialGroupID = materialGroupID;
    }

    @JsonProperty("MaterialGroupCode")
    public String getMaterialGroupCode() {
        return MaterialGroupCode;
    }

    public void setMaterialGroupCode(String materialGroupCode) {
        MaterialGroupCode = materialGroupCode;
    }

    @JsonProperty("MaterialGroupName")
    public String getMaterialGroupName() {
        return MaterialGroupName;
    }

    public void setMaterialGroupName(String materialGroupName) {
        MaterialGroupName = materialGroupName;
    }
}
